<!-- 推荐商品列表 -->
<template>
	<view class='recommend bg-color'>
			<view class='recommend-item' v-for='(item,index) in dataList' :key='index' @tap="goDetails(item.id)">
				<image class='item-big' :src="item.bigUrl" mode=""></image>
				<view class='item-small'>
					<block v-for='(k,i) in item.data' :key='i'>
						<image class='item-img' :src="k.imgUrl" mode=""></image>
					</block>
				</view>
			</view>
		</view>
</template>

<script setup>
	const props = defineProps({
		dataList:{
			type: Array,
		},
	})
	const goDetails = (id)=>{
		uni.navigateTo({
			url:'/pages/details/details?id='+id+''
		})
	}
</script>

<style scoped>
	.recommend{
		background-color: #fff;
		padding-bottom: 10rpx;
	}
	.recommend-item{
		display: flex;
		flex-direction: column;
		border-radius: 20rpx;
		border: 2rpx solid #CCCCCC;
		overflow: hidden;
		margin: 10rpx 0;
	}
	.item-big{
		width: 100%;
		height: 300rpx;
	}
	.item-small{
		margin-top: 10rpx;
		width: 100%;
		height: 240rpx;
	}
	.item-img{
		margin: 0 1rpx;
		width: 33%;
		height:240rpx;
	}
</style>